home *** CD-ROM | disk | FTP | other *** search
/ Champak 108 / jogo-disk-108.iso / Games / simple_tower_defense.swf / scripts / DefineButton2_54 / BUTTONCONDACTION on(release).as < prev    next >
Text File  |  2010-05-15  |  2KB  |  61 lines

  1. on(release){
  2.    if(_root.tp == 1)
  3.    {
  4.       _root.C = _root.C + 1;
  5.       ft.gotoAndStop(1);
  6.       duplicateMovieClip("t","t" + C,16384 + C);
  7.       _root.turretplace.start();
  8.       _root.tss = true;
  9.       _root["t" + C].number = _root.C;
  10.       _root.cash -= 20;
  11.       _root.ton = 0;
  12.    }
  13.    else
  14.    {
  15.       if(_root.tp == 2)
  16.       {
  17.          _root.C = _root.C + 1;
  18.          ft.gotoAndStop(1);
  19.          duplicateMovieClip("t2","t" + C,16384 + C);
  20.          _root.turretplace.start();
  21.          _root.tss = true;
  22.          _root["t" + C].number = _root.C;
  23.          _root.cash -= 50;
  24.          _root.ton = 0;
  25.       }
  26.       if(_root.tp == 3)
  27.       {
  28.          _root.C = _root.C + 1;
  29.          ft.gotoAndStop(1);
  30.          duplicateMovieClip("t3","t" + C,16384 + C);
  31.          _root.turretplace.start();
  32.          _root.tss = true;
  33.          _root["t" + C].number = _root.C;
  34.          _root.cash -= 100;
  35.          _root.ton = 0;
  36.       }
  37.       if(_root.tp == 4)
  38.       {
  39.          _root.C = _root.C + 1;
  40.          ft.gotoAndStop(1);
  41.          duplicateMovieClip("t4","t" + C,16384 + C);
  42.          _root.turretplace.start();
  43.          _root.tss = true;
  44.          _root["t" + C].number = _root.C;
  45.          _root.cash -= 100;
  46.          _root.ton = 0;
  47.       }
  48.    }
  49.    if(_root.tp == 5)
  50.    {
  51.       _root.C = _root.C + 1;
  52.       ft.gotoAndStop(1);
  53.       duplicateMovieClip("t5","t" + C,16384 + C);
  54.       _root.turretplace.start();
  55.       _root.tss = true;
  56.       _root["t" + C].number = _root.C;
  57.       _root.cash -= 150;
  58.       _root.ton = 0;
  59.    }
  60. }
  61.